From 3144b4c1fc774b63fc2350a0171e8ef01ab63298 Mon Sep 17 00:00:00 2001 From: Justin Burkett Date: Tue, 30 May 2017 08:25:52 -0400 Subject: [PATCH] Fix which-key-show-remaining-keys option --- which-key.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/which-key.el b/which-key.el index 6e4ffeaf76a..d3b619c1124 100644 --- a/which-key.el +++ b/which-key.el @@ -590,8 +590,6 @@ Used when `which-key-popup-type' is frame.") "Internal: Backup the value of `prefix-help-command'.") (defvar which-key--pages-plist nil "Internal: Holds page objects") -(defvar which-key--lighter-backup nil - "Internal: Holds lighter backup") (defvar which-key--current-prefix nil "Internal: Holds current prefix") (defvar which-key--current-page-n nil @@ -979,6 +977,7 @@ total height." (when (and which-key-idle-secondary-delay which-key--secondary-timer-active) (which-key--start-timer)) + (which-key--lighter-restore) (cl-case which-key-popup-type ;; Not necessary to hide minibuffer ;; (minibuffer (which-key--hide-buffer-minibuffer)) @@ -1764,8 +1763,6 @@ is the width of the live window." (when which-key-show-remaining-keys (let ((n-shown (nth page-n (plist-get which-key--pages-plist :keys/page))) (n-tot (plist-get which-key--pages-plist :tot-keys))) - (setq which-key--lighter-backup - (cadr (assq 'which-key-mode minor-mode-alist))) (setcar (cdr (assq 'which-key-mode minor-mode-alist)) (format " WK: %s/%s keys" n-shown n-tot))))) @@ -1773,7 +1770,7 @@ is the width of the live window." "Restore the lighter for which-key." (when which-key-show-remaining-keys (setcar (cdr (assq 'which-key-mode minor-mode-alist)) - which-key--lighter-backup))) + which-key-lighter))) (defun which-key--echo (text) "Echo TEXT to minibuffer without logging." -- 2.30.2